<html>
    <head>
        <title>Raw data filtering - Scan filters</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link rel="stylesheet" type="text/css" href="/net/sf/mzmine/desktop/impl/helpsystem/HelpStyles.css">
    </head>

    <body>

        <h1>Raw data filtering - Scan filters</h1>

        <h2>Description</h2>
        <p>
            This module comprises various filters that can be applied to the raw data
            scan by scan.
        </p>

         <p>
            The preview shows the superposed spectra of the scan before and after the filter is applied.
            <br><br><img src="preview.png" name="Preview">
        </p>

        <h3>Mean filter</h3>
        <p>
            For each data point, the filter assigns to it the intensity average of all the datapoints inside the
            user defined window, which is centered in the mass value of this data point.
        </p>
        <p>Raw data file before and after the filter was applied.
            <br><br><img src="meanFilter.png" name="Mean filter">
        </p>
        <h4>Method parameters</h4>
        <dl>
            <dt>Window length</dt>
            <dd>One-sided length of the m/z smoothing window.</dd>
        </dl>

        <h3>Savitzky Golay filter</h3>

        <p>The Savitzky–Golay smoothing filter is a type of filter first described
            in 1964 by Abraham Savitzky and Marcel J. E. Golay.[1]</p>
        <p>
            The Savitzky–Golay method essentially performs a local polynomial regression (of degree k)
            on a series of values (of at least k+1 points which are treated as being equally spaced in the series)
            to determine the smoothed value for each point. <a href="http://en.wikipedia.org/wiki/Savitzky%E2%80%93Golay_smoothing_filter">
                http://en.wikipedia.org/wiki/Savitzky-Golay_smoothing_filter</a>
        </p>

        <p>Raw data file before and after the filter was applied.
            <br><br><img src="SGFilter.png" name="Savitzky Golay filter">
        </p>
        <h4>Method parameters</h4>
        <dl>
            <dt>Number of datapoints</dt>
            <dd>This number can be 5, 7, 9, 11, 13 or 15. </dd>
        </dl>

        <h3>Crop filter</h3>
        <p>
            The scans out of the retention time range defined by the user are deleted
            by using this filter. Also, the data points of the remaining scans that are
            out of the m/z window defined by the user are deleted.
        </p>

        <h4>Method parameters</h4>
        <dl>
            <dt>m/z range</dt>
            <dd>m/z boundary of the cropped region.</dd>

            <dt>Retention time range</dt>
            <dd>Retention time boundary of the cropped region.</dd>
        </dl>

        <h3>m/z resample filter</h3>
        <p>
            Each scan is divide in m/z bins whose length is defined by the user in the
            parameters. The mass of the new data point will be in the middle of each
            m/z bin's space. Its intensity is the average of the intensity of all the
            data points inside the bin.
        </p>

        <p>Raw data file before and after the filter was applied.
            <br><br><img src="binFilter.png" name="Bin filter">
        </p>

        <h4>Method parameters</h4>
        <dl>
            <dt>m/z bin length</dt>
            <dd>The length of m/z bin.</dd>
        </dl>

        <h3>m/z round resample filter</h3>
        <p>
            All data points in each scan is shifted to the nearest rounded integer 
            (ion number). The mass of the new data point will be on the rounded value. 
            If several data points are competing for the same rounded 
            value / mass, the new data point's intensity is the average of all the 
            competing data points. 
            <!-- the highest (most intensive) only is kept. --> 
            Unless "Sum duplicate intensities" is checked, leading to a single new data 
            point with intensity equal to the sum of the intensities of all the 
            competing data points. 
            If the scan is not centroided, its spectrum is first turned into centroid 
            using a default "local maxima" algorithm, then the same algorithm as 
            described above is applied.
        </p>

        <p>Spectrum data points before (blue) and after (green) the filter was applied.
            <br><br>Centroid spectrum<br><img src="rndSamplingFilter.png" name="Round filter (centroid spectrum)">
            <br><br>Profile spectrum<br><img src="rndSamplingFilterProfile.png" name="Round filter (profile spectrum)">
        </p>

        <h4>Method parameters</h4>
        <dl>
            <dt>Sum duplicate intensities</dt>
            <dd>Sums ions count (intensity) of m/z peaks competing for being rounded at same m/z unit. 
            If unchecked, the intensities are averaged rather than summed.</dd>
        </dl>
        <dl>
            <dt>Remove zero intensity m/z peaks</dt>
            <dd>Clear all scans spectra from m/z peaks with intensity equal to zero.</dd>
        </dl>

    </body>
</html>
